<?php
/**
* 此处文章修改数据读取
*/
class ModelInformationxiugai extends GetLoad
{
	
	public function information($information_id){
		$reluse=$this->SQLquery("SELECT * FROM information WHERE information_id='".$information_id."'");
		//var_dump($reluse);
		//echo $information_id;
		return $reluse[0];

	}



	public function informationshanchu($information_id)
	{

		$rusule=$this->SQLquery("SELECT * FROM name where name='".$_COOKIE["name"]."' AND password='".$_COOKIE["password"]."'");
		$in=$this->SQLquery("SELECT * from information where information_id='".$information_id[0]."'");
		if($rusule){
		$this->SQLquery("DELETE FROM information WHERE information_id = ".$information_id[0]." and name_id=".$rusule['0']['name_id']);
		$this->SQLquery("INSERT INTO lajixiang (yuanyin,title,name_id,chakan) VALUES ('1','".$in[0]['title']."','".$rusule[0]['name_id']."','1') ");
		}

		header("Location: ./index.php?route=Controller/zhuye/ControllerZhuye/index&=".$rusule[0]['name_id']); 
	}


}